#ifndef __PID_HPP__
#define __PID_HPP__
#ifdef __cplusplus
extern "C"
{
#endif

#ifdef __cplusplus
}
#endif
#include "cstdint"
class PIDControl
{
private:
    float LastError;
    float Integral;
    float Output;
    float LastOutput;
    float Kp;
    float Ki;
    float Kd;
    const float K = 0.3f;
    float Last_D;
public:
    float Integerrlimit;
    float Outputlimit;
    PIDControl() = default;
    PIDControl(float kp, float ki, float kd, float integerrlimit,float outlimit);
    void PID_Config(float kp, float ki, float kd);
    ~PIDControl();
    float operator()(float error);
};
#endif